package com.travel.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 房间设施关联表
 * @TableName hotel_facilities_rooms
 */
@TableName(value ="hotel_facilities_rooms")
@Data
public class HotelFacilitiesRooms implements Serializable {
    /**
     * 
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 设施id
     */
    @TableField(value = " hotel_facilities_id")
    private Integer hotelFacilitiesId;

    /**
     * 房间id
     */
    @TableField(value = "rooms_id")
    private Integer roomsId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HotelFacilitiesRooms other = (HotelFacilitiesRooms) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHotelFacilitiesId() == null ? other.getHotelFacilitiesId() == null : this.getHotelFacilitiesId().equals(other.getHotelFacilitiesId()))
            && (this.getRoomsId() == null ? other.getRoomsId() == null : this.getRoomsId().equals(other.getRoomsId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHotelFacilitiesId() == null) ? 0 : getHotelFacilitiesId().hashCode());
        result = prime * result + ((getRoomsId() == null) ? 0 : getRoomsId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", hotelFacilitiesId=").append(hotelFacilitiesId);
        sb.append(", roomsId=").append(roomsId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}